<?php
/**
 * admin模块基础类
 * User: ws
 * Date: 2018/7/20
 * Time: 14:39
 */

namespace app\merchant\controller;
use think\Controller;

class Init  extends Controller
{

    function _initialize()
    {
        parent::_initialize();
        error_reporting(0);
        $this->model = model('admin/admin_user');
        if(!session('?admin_user') && strtolower(request()->controller()) != 'login'){
            $this->redirect('login/login');
        }
        $this->settings = cache('settings');
        // 发送基本信息
        $this->assign(['settings' => $this->settings,'admin_user' => session('admin_user')]);
    }



}